﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">

    <title>@ViewBag.Title</title>
    <script>
        if (top == self) {
            location.href = "@Url.Action("Index","Home",new { area="" })";
        }
    </script>

    <!-- CSS文件引用 -->
    <link href="~/Content/Script/Plug/layui/css/layui.css" rel="stylesheet" />
    <link href="~/Content/Script/Plug/FontIcon/css/font-awesome.css" rel="stylesheet" />
    <link href="~/Content/CSS/Common.css" rel="stylesheet" />
    <!-- JS文件引用 -->
    <script src="~/Content/Script/jquery-3.2.1.min.js"></script>

    @RenderSection("css", false)
</head>
<body style="padding:5px;">

    @RenderBody()


    <script src="~/Content/Script/Plug/layui/layui.all.js"></script>
    <script src="~/Content/Script/Common.js"></script>
    <script>

        // 固定块
        layui.util.fixbar({
            bar1: "&#xe68e;",
            //css: { right: 50, bottom: 50 },
            bgcolor: '#9F9F9F',
            click: function (type) {
                if (type === 'bar1') {
                    //询问框
                    layer.confirm('是否跳转至首页？', {
                        icon: 3,
                        title: "询问",
                        btn: ['确认', '取消'] // 按钮
                    }, function (index) {
                        parent.location.href = "@Url.Action("Index","Home",new { area="" })";
                        }, function (index) {
                            layer.close(index);
                        });
                    }
                }
        });

        // 侧边栏
        if ($("#Sidebar").length>0) {
            layer.open({
                type: 1,// 页面层
                title:'目录', // 标题
                shade: false,// 禁用遮罩
                area: ['200px', 'auto'],// 大小
                resize: false,// 禁止拉伸
                closeBtn:0,// 禁用关闭按钮
                offset:'rt',// 靠右
                content: $("#Sidebar"), // 容器
                maxmin: true// 开启最大最小化
            });
        }

        // 加载代码修饰器
        layui.use('code', function () { //加载code模块
            layui.code({
                about: false,
                encode: true
            }); //引用code方法
        });

        // 监听表单提交事件
        layui.use('form', function () {
            var form = layui.form;

            //监听提交
            form.on('submit(btn)', function (data) {

                var url = $(data.elem).data("url");

                if (!url)
                    return true;

                $.post(url, data.field, function (res) { eval(res); })

                return false;
            });

        });

        Float(".title-pin");

    </script>

    @RenderSection("jq", false)
</body>
</html>
